<template>
    <div id="listView">
        <div v-for="(item,index) in dataList" :key="index" class="item">
            <span class="icon">
                <svg :fill="item.iconColor">
                    <use :xlink:href="item.icon"></use>
                </svg>
            </span>
            <div class="info">{{item.info}}</div>
        </div>
    </div>
</template>

<script>
export default {
    name: "ListView",
    props: {
        dataList: {
            type: Array,
            default: () => {
                return []
            }
        }
    }
}
</script>

<style scoped>
#listView {
    background-color: #fff;
    font-size: 15px;
    color: #333;
}
.item {
    height: 44px;
    line-height: 44px;
    display: flex;
    align-items: center;
    position: relative;
}
.item .icon {
    position: absolute;
    left: 15px;
    top: 5px;
}
.icon svg {
    width: 18px;
    height: 18px;
}

.item .info {
    margin-left: 40px;
    border-bottom: 1px solid rgba(100, 100, 100, 0.1);
    padding-left: 5px;
    flex: 1;
}

.item:last-of-type .info {
    border-bottom: none;
}
</style>